<?php 
if(isset($_SESSION['user']) && $_SESSION['user']['user_id']){ ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>CBAY</title>
		<script type="text/javascript">
		$(function($){
			$('a.mobile-menu-icon').click(function(){
				$('#sidebar').toggleClass('active');
			});
		});
		</script>
		<?php  $basePath=$this->basePath;?>
		<?php $baseUrl=$this->baseUrl;?>		
		<script> 
		var BASE_PATH = '<?php echo $basePath;?>';
		var BASE_URL = '<?php echo $baseUrl;?>';
		</script>	
	</head>
	<body>
		<div class="bg-cover"></div>
		<div id="wrapper" class="container">
			<header id="header" class="header">
				<nav class="navbar navbar-default">
				<div class="navbar-right user-details">
				<div class="dropdown">
					
						Welcome <a href="#" data-toggle="dropdown" class="dropdown-toggle"> <? echo ucfirst($_SESSION['user']['username']);?><span class="icon_down"><img src="<?php echo $this->basePath() ?>/images/down-icon.png" /></span></a>
						<ul class="dropdown-menu" role="menu">
						<li>
						<div class="user-profile">
										<div class="arrow-up"></div>
										<div class="profile_icon col-xs-3"> 
							
								
								
								
										<img src="<?php echo $this->basePath() ?>/images/profile_icon.png" />
									</div>
									<div class="profile_details col-xs-8">
										<h4><a href="<?php echo $this->basePath() ?>/users/profile"><? echo ucfirst($_SESSION['user']['username']);?></a></h4>
										<span><? echo ucfirst($_SESSION['user']['cityname']);?> - <? echo $_SESSION['user']['countryname'];?></span>
										<h3><a href="/users/user-previous?user_id=<? echo $_SESSION['user']['user_id'];?>"><button class="btn btn-danger">View Profile</button></a>
											<a href="javascript:void(0);" onclick="return sessionOut();"><button class="btn btn-danger">Sign Out</button></a>
										</h3>
									</div>
						</div>
</li><li>						
								
								<div class="offres_bids">
									<div class="offers">
										<span>Sell Offers:</span>
										<a href="#" class="sell-bid-link">10</a>
									</div>
									<div class="bids">
										<span>Bids Received:</span>
										<a href="#" class="sell-bid-link">10</a>
									</div>
								</div>
							
							
						</li>
					</ul>
					</div>
				</div></nav>
			</header>
			 <section class="main-section">
			<?php echo $this->partial('users/users/left-menu.phtml',array('page'=>'menu'));?>
		    
<script type="text/javascript" charset="utf-8">
function sessionOut(){
	  $.ajax({
		url: '/users/logout',
		success: function(data){
			if(data.output=='success'){
				window.location='/';
			}
		}
	});
}
</script>
<?}?>
